package JiaRongRongpack01;

//编写一个学生类Student，属性有：学号、姓名、年龄，对属性进行封装，
// 方法有：public void show(),用于显示学生属性信息。
public class Student{
    private String sno;
    private String name;
    private int age;


    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    public void show(){
        System.out.println("该学生信息："+sno+","+name+","+age);
    }
    public Student(String sno,String name,int age){
        this.sno=sno;
        this.name=name;
        this.age=age;
    }
    public Student(){
        this.sno="0000";
        this.name="海经院学生";
        this.age=18;
    }
}
